<?php

/**
 * IndexController
 * 
 * @author
 * @version 
 */

class Admin_RequirementController extends Zend_Controller_Action {
	/**
	 * The default action - show the home page
	 */
	public function indexAction() {
        $this->_helper->layout()->enableLayout();
	}
	
	public function viewAction(){
		$req = new Reale_Model_Requirement();
		$pending = $req->fetchAll();
		
		$this->view->assign('req',$pending);
	}
	
	public function acknowledgeAction(){
		$this->_helper->viewRenderer->setNoRender(TRUE);
        $this->_helper->layout()->disableLayout();
		$req_id = $this->getRequest()->getParam('req_id');
		$req = new Reale_Model_Requirement();
		if ($req->acknowledge()) {
            return true;
        }
        else{
           	throw new Exception('Cannot acknowledge.', Zend_Log::ERR);
        }
		
	}
}
?>

